package com.study.myteach.发布订阅模式;

/**
 * @author lk
 * @date 2021/4/30 0030 11:38
 * @description:
 */
public class Client {
    public static void main(String[] args) {
        WeatherStation station = new WeatherStation();
        Observer web = new WebObserver();
        Observer tv = new TVObserver();
        station.registerObserver(web);
        station.registerObserver(tv);
        Weather weather = new Weather();
        weather.setPressure(10.5);
        weather.setTemp(32.5);
        station.setWeather(weather);
    }
}
